#define _CRT_SECURE_NO_WARNINGS
#define NAME_SIZE 20
#define GENDER_SIZE 5
#define PNUM_SIZE 11
#define ADDR_SIZE 50
#define CAPACITY 3
#include<stdio.h>
#include<string.h>
#include<stdlib.h>
void menu();
enum MethodName {
	EXIT,
	ADD,
	DEL,
	MODIFY,
	SHOW,
	SORT,
	SEARCH
};
struct PhoneInfo
{
	char name[NAME_SIZE];
	int age;
	char gender[GENDER_SIZE];
	char pNum[PNUM_SIZE];
	char addr[ADDR_SIZE];
};
struct Content 
{
	struct PhoneInfo * data;
	int currentIndex;
	int capacity;
};
void initData(struct Content* ps);
void add(struct Content* ps);
void show(const struct Content* ps);
void del(struct Content* ps);
//int findByName(const struct Content * ps, char name[NAME_SIZE]);
void search(const struct Content* ps);
void modify(const struct Content* ps);
void sort(const struct Content* ps);
void destory(struct Content* ps);
